<?php

use console\db\channels\TransferTableMigration;
use yii\db\Query;

/**
 * 球迷学院用户生命迁移
 * 
 * @author emhome <emhome@163.com>
 * @since 1.0
 */
class m300060_000009_t_college_user_live extends TransferTableMigration {

    /**
     * @inheritdoc
     */
    public $sourceDb = 'olddb';

    /**
     * @inheritdoc
     */
    public function getTransferOptions() {
        return [
            'table' => [
                'college_user_live' => 'a_user_live',
            ],
            'columns' => [
                'id',
                'user_id',
                'share',
                'lives',
                'date',
                'status' => function($data) {
                    return 10;
                },
                'created_at' => function($data) {
                    return strtotime($data['date']);
                },
                'updated_at' => function($data) {
                    return strtotime($data['date']);
                },
            ],
        ];
    }

}
